package com.mitake.nick.dao;

import javax.sql.DataSource;

import org.springframework.jdbc.core.JdbcTemplate;

import com.mitake.nick.bean.SMUser;

public class UserDao implements IUserDAO {
	
	private JdbcTemplate jdbcTemplate;
	
	public void setDataSource(DataSource dataSource){
		jdbcTemplate = new JdbcTemplate(dataSource);
	}

	@Override
	public void insert(SMUser smUser) {

//		jdbcTemplate.update(sql);
	}

	@Override
	public SMUser find(Integer id) {
		
		return (SMUser) jdbcTemplate.queryForList("select * from dbo.SMUser where Id ="+ id);
	}

	@Override
	public void update(SMUser smUser) {
		
//		jdbcTemplate.update(sql);
	}

	@Override
	public void delete(SMUser smUser) {
		
	}

}
